//
//  TimeWidgetTypeModel.swift
//  WidgetExample
//
//  Created by Ben on 2022/4/19.
//  Copyright © 2022 Ben. All rights reserved.
//

import Foundation

enum TimeWidgetStyle: Int {
    case mock               = 0
    case electronic         = 1
}

struct TimeWidgetTypeModel: Codable {
    
    var id: String
    var name: String
    var type_value: Int
    var type: TimeWidgetStyle {
        return TimeWidgetStyle(rawValue: type_value) ?? .mock
    }
    
    static let normal = TimeWidgetTypeModel(id: "1", name: "时钟组件1", type_value: TimeWidgetStyle.mock.rawValue)
}
